package cn.ekuma.epos.subject;

import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.openbravo.bean.erp.subject.Subject;
import com.openbravo.data.basic.BasicException;
import com.openbravo.data.gui.MessageInf;
import com.openbravo.data.loader.LocalRes;
import com.openbravo.pos.base.AppLocal;
import com.openbravo.pos.inventory.ProductsPanel;
import com.openbravo.pos.model.AbstractPosSwingModel;
import com.openbravo.pos.panels.ProductFilter;

import cn.ekuma.data.dao.I_DataLogic;
import cn.ekuma.data.ui.swing.SwingEditorRecord;
import cn.ekuma.epos.datalogic.I_DataLogicERP;
import cn.ekuma.epos.module.ERP_UI_Swing_Model;
import cn.ekuma.epos.panel.JPanelTableDAO;
import cn.ekuma.epos.productsfinishing.ProductsEditor;



public class SubjectPanel extends JPanelTableDAO<Subject> {

	private I_DataLogicERP m_dlSales;
	private SubjectEditor jeditor;

	@Override
	public String getTitle() {
		return AppLocal.getIntString("label.Subject");
	}

	@Override
	public Component getFilter() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected void init() {
	     jeditor = new SubjectEditor(m_dlSales, dirty);
	}

	@Override
	public SwingEditorRecord getEditor() {
		return jeditor;
	}

	@Override
	public I_DataLogic getDataLogic() {
		return m_dlSales;
	}

	@Override
	public Class getSuportClass() {
		return Subject.class;
	}

	@Override
	public String getObjectRenderString(Subject obj) {
		return obj.getName();
	}

	@Override
	public String getModelName() {
		return ERP_UI_Swing_Model.MODEL_NAME;
	}

	@Override
	public void setModel(AbstractPosSwingModel mode) {
		 m_dlSales = mode.getDLERP();	
	}

}
